<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="utf-8" />
    <title>发布文章</title>
    <link rel="stylesheet" href="./e/css/style.css" />
    <link rel="stylesheet" href="./e/css/editormd.css" />
    <link rel="shortcut icon" href="https://pandao.github.io/editor.md/favicon.ico" type="image/x-icon" />
    <link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
    <link rel="stylesheet" href="../../css/e.css">
    <link rel="stylesheet" href="./css/new.css">
</head>

<body>
    <div id="layout">
        <div id="test-editormd">
            <textarea style="display:none;" id="edi"></textarea>
        </div>
    </div>
    <div class="box" v-cloak>
        <el-select v-model="tag" placeholder="请选择分类">
            <el-option v-for="item in options" :key="item.Id" :label="item.name" :value="item.name">
            </el-option>
        </el-select>
        <el-input placeholder="请输入标题..." v-model="title"></el-input>
        <el-button type="primary" @click="dialogFormVisible = true">上传封面图<i class="el-icon-upload el-icon--right"></i></el-button>
        <el-button type="primary" @click="save_book()">发布</el-button>
        <!-- 上传图片 -->
        <el-dialog title="选择封面图" :visible.sync="dialogFormVisible">
            <form name="form1" id="form2" enctype="multipart/form-data">
                <input type="file" name="photo" id="photo" style="display: none;">
                <div>
                    <ul class="el-upload-list el-upload-list--picture-card" v-if="up_img">
                        <li tabindex="0" class="el-upload-list__item is-success">
                            <a class="el-upload-list__item-name">
                                <i class="el-icon-document"></i>
                            </a>
                            <label class="el-upload-list__item-status-label">
                                <i class="el-icon-upload-success el-icon-check"></i>
                            </label>
                            <i class="el-icon-close"></i>
                            <img :src="up_img" alt="" width="148px" height="148px">
                            <span class="el-upload-list__item-actions">
                                <span class="el-upload-list__item-preview" @click="window.open(up_img)">
                                    <i class="el-icon-zoom-in"></i>
                                </span>
                                <span class="el-upload-list__item-delete" @click="up_img=''">
                                    <i class="el-icon-delete"></i>
                                </span>
                            </span>
                        </li>
                    </ul>
                    <div tabindex="0" class="el-upload el-upload--picture-card" @click="select_img()" id="select"><i
                            class="el-icon-plus"></i></div>
                </div>
            </form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogFormVisible = false">取 消</el-button>
                <el-button type="primary" @click="upload_run()">上 传</el-button>
            </div>
        </el-dialog>
        <!-- 上传图片 -->
    </div>
</body>

<script src="./e/js/jquery.min.js"></script>
<script src="./e/js/editormd.js"></script>
<script src="../../../common/v.js"></script>
<script src="../../js/e.js"></script>
<script src="../../../common/a.js"></script>
<script src="./js/new.js"></script>

</html>